package com.design_pattern._01_create._04_factory;

/**
 * 交通工具工厂
 */
public class VehicleFactory {

    /**
     * 简单工厂
     */
    public Car createCar(){
        System.out.println("logging start...");
        Car car = new Car();
        System.out.println("logging end...");
        return car;
    }

    public Plane createPlane(){
        return new Plane();
    }

    /**
     * 静态工厂
     */
    public static Car createCar2(){
        return new Car();
    }

}

class Car{

}
class Plane{

}